package com.freecloud.javabasics.design.proxy.mybatis.plugins;

import com.freecloud.common.LoggerUtil;
import com.freecloud.javabasics.design.proxy.mybatis.annotation.FreeSignature;
import com.freecloud.javabasics.design.proxy.mybatis.supper.FreeInterceptor;
import com.freecloud.javabasics.design.proxy.mybatis.supper.FreeInvocation;

/**
 * 日志输出
 * @Author: maomao
 * @Date: 2021-04-11 18:39
 */
@FreeSignature(method = "query")
public class LoggerInterceptor implements FreeInterceptor {

    @Override
    public Object intercept(FreeInvocation invocation) throws Throwable {

        LoggerUtil.printThread("自定义日志插件-日志输出");

        return invocation.proceed();
    }
}
